import React from 'react';
import css from './index.less';
import PropTypes from 'prop-types';
import Icon from 'components/icon';


class Check extends React.Component {

  static propTypes = {
    mod: PropTypes.object,
    label: PropTypes.string,
    isControls: PropTypes.bool,
  };

  static defaultProps = {
    mod: {},
    label: '',
    isControls: false,
  };



  render() {
    const { label, myKey, click = () => {}, } = this.props;
    const props = {
      type: myKey ? 'icon-radio-checked' : 'icon-radio-unchecked',
      onClick: () => {click();},
    };
    return (
      <div className={css.check}>
        <Icon {...props}/>
        <span>{label}</span>
      </div>
    );
  }
}

export default Check;


